package com.zhoushihao.class0818;

public class SaleEmployee extends Employee{
    int baseMoney;//2000
    int saleMoney;//1000000
    double rate;//0.02

    public SaleEmployee(String no, String name, int baseMoney, int saleMoney, double rate) {
        super(no, name);
        this.baseMoney = baseMoney;
        this.saleMoney = saleMoney;
        this.rate = rate;
    }

    @Override
    public int ComputeSalary() {
        double totalSalary = baseMoney + saleMoney*rate;
        return (int)totalSalary;
    }
}
